package gov.cn.user.handler;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

@Component
public class MetaObjHandler implements MetaObjectHandler {

    @Override
    public void insertFill(MetaObject metaObject) {
        Object isDeleted = this.getFieldValByName("isDeleted", metaObject);
        if(isDeleted == null){
            this.strictInsertFill(metaObject, "isDeleted", Integer.class, 0);
        }
    }

    @Override
    public void updateFill(MetaObject metaObject) {

    }
}
